(function () {
    'use strict';

    // Usage:
    //
    // Creates:
    //

    angular
        .module('yky.components')
        .component('admin', {
            template: `<nav class="navbar navbar-default navbar-fixed-top bg-dark box-shadow-lg" role="navigation">
	<div class="container-fluid">
		<!-- Brand and toggle get grouped for better mobile display -->
		<div class="navbar-header">
			<a class="navbar-brand"><span class="text-white">艺考云平台</span></a>
		</div>

		<!-- Collect the nav links, forms, and other content for toggling -->
		<div class="collapse navbar-collapse">
			<ul class="nav navbar-nav">

				<li ng-repeat="m in $ctrl.menus" class="" ui-sref-active="active"><a ui-sref="{{m.state}}">{{m.name}}</a></li>

			</ul>

			<ul class="nav navbar-nav navbar-right">
				<li class="m-t m-r">
					<user-info user="$ctrl.userInfo" on-submit="$ctrl.changePw($value)" on-logout="$ctrl.logout()"></user-info>
				</li>
			</ul>
		</div>
		<!-- /.navbar-collapse -->
	</div>
	<!-- /.container-fluid -->
</nav>
<div style="padding-top:50px;" class="h-full" ui-view></div>
`,
            //templateUrl: 'templateUrl',
            controller: AdminController,
            bindings: {
                Binding: '='
            }
        });

    AdminController.inject = [];
    function AdminController() {
        var vm = this;
        vm.menus = [
            {name:'考试管理',state:'admin.exams'},
            {name:'成绩管理',state:'admin.score'},
            {name:'机构管理',state:'admin.orgs'}
        ]
        ////////////////

        vm.onInit = function () {};
        vm.onChanges = function (changesObj) {};
        vm.onDestory = function () {};
    }
})();